<%@ page contentType="text/html;charset=UTF-8" %>
<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>编辑管理员</title>
    <%@ include file="/WEB-INF/pages/commons/head-meta.jsp" %>
    <%@ include file="/WEB-INF/pages/commons/js-meta.jsp" %>
    <style type="text/css">
        #funcregTree li {
            padding: 5px 0;
            display: block;
            border-top: 1px solid #e7e7eb;
            width: 100%;
        }

        .fxcontent {
            height: calc(100% - 80px);
        }

        .btn-primary {
            margin-left: 10px;
        }

        .wrapper {
            height: calc(100%);
        }

        .ibox {
            margin-bottom: 0
        }
    </style>

</head>

<body class="gray-bg">
<form class="form-horizontal" id="submitForm" style="height: 100%">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row fxbox">
            <div class="col-sm-12 fxcontent">
                <div class="ibox float-e-margins">
                    <div class="ibox-content">
                        <input type="hidden" name="id" id="id" value="${admin.id}">


                        <div class="form-group">
                            <label class="col-sm-2 control-label"><i style="color:red;">*</i>账号</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control trimInput" autocomplete="OFF" name="account"
                                       id="account"
                                       value="${admin.account}">
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>

                        <div class="form-group">
                            <label class="col-sm-2 control-label"><i style="color:red;">*</i>密码</label>
                            <div class="col-sm-8">
                                <input type="password" class="form-control trimInput" id="password" autocomplete="OFF"
                                       name="password" value="${admin.password}">
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>


                        <div class="form-group">
                            <label class="col-sm-2 control-label"><i style="color:red;">*</i>电话</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control trimInput" name="phone" id="phone"
                                       autocomplete="OFF" value="${admin.phone}">
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>

                        <div class="form-group">
                            <label class="col-sm-2 control-label"><i style="color:red;">*</i>角色</label>
                            <div class="col-sm-8">
                                <select class="form-control m-b" name="roleId">
                                    <c:forEach items="${roleList}" var="role">
                                        <option value="${role.id}" ${role.id == admin.roleId ? 'selected':'' }>${role.name }</option>
                                    </c:forEach>
                                </select>
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>


                        <div class="form-group">
                            <label class="col-sm-2 control-label"><i style="color:red;">*</i>状态</label>
                            <div class="col-sm-8">
                                <select class="form-control m-b" id="status" name="status">
                                    <option value="10" ${10 == admin.status ? 'selected':'' }>开启</option>
                                    <option value="20" ${20 == admin.status ? 'selected':'' }>关闭</option>
                                </select>
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>


                        <div class="form-group">
                                <button style="margin-left: 45%" class="btn btn-sm col-sm-offset-1 btn-info" type="submit">提交</button>
                                <a class="btn btn-sm col-sm-offset-1 btn-default" style="margin-left: 10px" href="${ctx}/admin/admin/go/list">返回</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</form>
<script src="${ctx}/theme/hplus/js/plugins/validate/jquery.validate.min.js?v=${version}"></script>
<script src="${ctx}/theme/hplus/js/plugins/validate/messages_zh.min.js?v=${version}"></script>
<script src="${ctx}/js/manager/admin/modify.js"></script>
<script>
    function myRefresh() {
        window.location.reload();
    }

    function myHistory() {
        window.history.back();
    }
</script>


</body>

</html>
